package com.junchenrobot.mes.response.impl;

import  com.alibaba.fastjson.annotation.JSONField;
import com.junchenrobot.mes.response.BaseResponse;
import lombok.Getter;
import lombok.Setter;

/**
 * rcs 响应
 *
 * @author SeaWave
 * @date 2022/11/14
 */
@Getter
@Setter
public class RcsResponse implements BaseResponse {


    @JSONField(name = "Result")
    private Boolean Result;
    
    @JSONField(name = "message")
    private String Message;
    
    @Override
    public BaseResponse success() {
        RcsResponse rcsResponse = new RcsResponse();
        rcsResponse.setResult(Boolean.TRUE);
        rcsResponse.setMessage("");
        return rcsResponse;
    }
    
    @Override
    public BaseResponse success(Object msg) {
        RcsResponse rcsResponse = new RcsResponse();
        rcsResponse.setResult(Boolean.TRUE);
        rcsResponse.setMessage("");
        return rcsResponse;
    }

    @Override
    public Boolean getResult(){
        return Result;
    }
    @Override
    public BaseResponse fault(Object data) {
        RcsResponse rcsResponse = new RcsResponse();
        rcsResponse.setResult(Boolean.FALSE);
        rcsResponse.setMessage(data.toString());
        return rcsResponse;
    }
}
